import { isProd } from './env';
const pxToViewPort = require('postcss-px-to-viewport');

export default {
  // 去除生产console
  extraBabelPlugins: [isProd ? 'transform-remove-console' : ''],
  extraPostCSSPlugins: [
    pxToViewPort({
      unitToConvert: 'px',
      viewportWidth: 1920,
      viewportHeight: 1080,
      unitPrecision: 5,
      propList: ['*'],
      viewportUnit: 'vw',
      fontViewportUnit: 'vw',
      selectorBlackList: [],
      minPixelValue: 1,
      mediaQuery: false,
      replace: true,
    }),
  ],
};
